# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sshatter
pkgver=1.2
pkgrel=9
pkgdesc='Password bruteforcer for SSH.'
url='http://www.nth-dimension.org.uk/downloads.php?id=34'
groups=('blackarch' 'blackarch-cracker')
license=('GPL')
arch=('any')
depends=('perl' 'perl-parallel-forkmanager' 'perl-net-ssh-perl'
         'perl-cryptx')
DLAGENTS=("http::/usr/bin/curl -L -k -o %o %u")
source=("SSHatter-$pkgver.tar.gz"::"http://www.nth-dimension.org.uk/utils/get.php?downloadsid=34")
sha512sums=('bed8ea70ddb3800a510f966bfda756a16966aa211cf9934a5eeb57b3ed5c200af78b1a291faa83dc8600abbff6522eac0af4e370cbfc7c531dadd4a2042aa4ca')

package() {
  cd "SSHatter-$pkgver/src"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec perl SSHatter.pl "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

